package cn.itcast.bos.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.itcast.bos.service.take_delivery.WayBillService;

/**
 * 定时查询数据库，同步索引库
 * 
 * @author itcast
 *
 */
public class WayBillIndexSyncJob implements Job {
	
	private final Logger Log = LoggerFactory.getLogger(WayBillIndexSyncBean.class);
	
	@Autowired
	private WayBillService wayBillService;

	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		wayBillService.syncIndex();
		Log.info("WayBillIndexSyncJob execute定时查询数据库，同步索引库");
	}
}
